package org.xmonkey.controller.extractor.visitors;

import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;

import org.xmonkey.notifier.SubscriptionsRegister;

/**
 * This class is responsible for analyzing a single AST corresponding
 * to a compilation unit. Each method of this class is responsible
 * for "visiting" a single node of the AST.
 * @author Jacopo Malnati
 *
 */
public final class CompilationUnitVisitor extends ASTVisitor {
	private IProject project;
	
	public CompilationUnitVisitor(IProject project, boolean visitDocTags){
		super(visitDocTags);
		this.project = project;
	}

	/**
	 * For each node, notify its visit
	 */
	@Override
	public void preVisit(ASTNode node) {
		super.preVisit(node);
		SubscriptionsRegister.getInstance().notifyVisit(project, node);
	};


	
	

}
